﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace HelloWPF.CustomControl
{
    /// <summary>
    /// 1、继承自Panel
    /// </summary>
    public class WaterfallFlow:Panel
    {


        //获取容器的宽度

        /// <summary>
        ///  复写
        /// </summary>
        /// <param name="availableSize"></param>
        protected override Size MeasureOverride(Size availableSize)
        {
            int columnCount = 5;
            //平均宽度
            double averageWidth =  availableSize.Width / columnCount;
            Size size = new Size();
            return size;
        }

        /// <summary>
        ///  复写
        /// </summary>
        /// <param name="availableSize"></param>
        protected override Size ArrangeOverride(Size finalSize)
        {
            Size size = new Size();
            return size;
        }
    }
}
